package guda.house.dal.dao;

import guda.house.dal.dataobject.BillElecDO;
import guda.grape.autogen.common.page.BaseQuery;
import guda.house.dal.dataobject.BillEstateDO;
import guda.house.dal.dataobject.BillWaterDO;

import java.util.Date;
import java.util.List;

public interface BillElecDAO {


    Long insert(BillElecDO billElec);


    BillElecDO getBillElecById(Long recordId);


    boolean delBillElecById(Long recordId);

    List<BillElecDO> getBillElecByIds(List idsList);

    /**
     * 清空测试用例加入的autoincrement
     */
    void cleanAutoIncrement(Long recordId);

    List<BillElecDO> selectForPage(BaseQuery baseQuery);

    int countForPage(BaseQuery baseQuery);

    void updateByIdSelective(BillElecDO billElec);

    List<BillElecDO> getBill(Long suiteId, Integer recordYear, Integer recordMonth);

    List<BillElecDO> selectForUnpay(BaseQuery baseQuery);

    int countForUnpay(BaseQuery baseQuery);


    Long statBill(List<Long> suitIdList,String gmtDate,Integer isPayed);

    Long statBillRate(List<Long> suitIdList,String gmtStart, String gmtEnd,Integer isPayed);

    List<BillElecDO> getByPayId(Long payId);


    BillElecDO queryLatest(Long suiteId);

    Long statDichanDiscount(List<Long> suitIdList,String gmtDate);

    Long statSelfDiscount(List<Long> suitIdList,String gmtDate);

    List<BillElecDO> statLastBill(List<Long> suiteIdList,Integer isPayed);

    List<BillElecDO> getBillList(List<Long> suiteIdList,Date gmtStart,Date gmtEnd,Integer isPayed);

    List<BillElecDO> getBillByYear(List<Long> suitIdList,Integer recordYear,Integer isPayed);

    Long statBillByYear(List<Long> suitIdList,Integer year,Integer isPayed);

    Long statPaidBill(List<Long> billIdList);
}
